
package dieci.hibernate;

import dieci.database.PersistentObject;
import dieci.system.Product;
import java.util.HashSet;
import java.util.Set;

/**
 *
 * @author DuckSys
 */
public class HibProduct implements PersistentObject{

    public HibProduct()
    {
    }
        
    
    public HibProduct(Product product)
    {
        this.productCode = product.getProductCode();
        this.productDescription = product.getProductDescription();
        this.productDescriptionLong = product.getProductDescriptionLong();
        this.productSize = product.getProductSize();
        this.productColor = product.getProductColor();  
        this.cost = product.getCost();
        this.deleted = product.getDeleted();
    }

    public HibProduct(long productId, Product product)
    {
        this(product);
        this.productId = productId;
    }
    
    
    public String getProductCode() 
    {
        return productCode;
    }

    public void setProductCode(String productCode) 
    {
        this.productCode = productCode;
    }

    public String getProductDescription() 
    {
        return productDescription;
    }

    public void setProductDescription(String productDescription) 
    {
        this.productDescription = productDescription;
    }

    public String getProductDescriptionLong() 
    {
        return productDescriptionLong;
    }

    public void setProductDescriptionLong(String productDescriptionLong) 
    {
        this.productDescriptionLong = productDescriptionLong;
    }
               
    /**
     * Get the value of productPrice
     *
     * @return the value of productPrice
     */
    public Set<HibPrice> getProductPrice()
    {
        return productPrice;
    }

        
    /**
     * Set the value of productPrice
     *
     * @param productPrice new value of productPrice
     */
    public void setProductPrice(Set<HibPrice> productPrice)
    {
        this.productPrice = productPrice;
    }
    
        
    public String getProductSize()
    {
        return productSize;
    }

    public void setProductSize(String productSize)
    {
        this.productSize = productSize;
    }

    public String getProductColor()
    {
        return productColor;
    }

    public void setProductColor(String productColor)
    {
        this.productColor = productColor;
    }

    public long getProductId()
    {
        return productId;
    }

    public void setProductId(long productId)
    {
        this.productId = productId;
    }

        /**
     * Get the value of cost
     *
     * @return the value of cost
     */
    public double getCost()
    {
        return cost;
    }

    /**
     * Set the value of cost
     *
     * @param cost new value of cost
     */
    public void setCost(double cost)
    {
        this.cost = cost;
    }
    
    public int getDeleted() {
        return deleted;
    }

    public void setDeleted(int deleted) {
        this.deleted = deleted;
    }
    
    private long productId;
    
    private String productCode;
    
    private String productDescription;
    
    private String productDescriptionLong;
    
    private Set<HibPrice> productPrice = new HashSet<HibPrice>();
    
    private String productSize;
    
    private String productColor;
    
    private double cost;

    private int deleted;

}
